#!/run/current-system/profile/bin/bash

if [ $# -ne 3 ] ; then
    echo "REQUIRED ARGS: dump tidy conf"
    exit
fi

dump="$1"
tidy="$2"
conf="$3"

while read line; do
    hash="${line:0:64}"
    tidyfile="${line:64}"
    
    mkdir -p `dirname "$tidyfile"`
    ln -s `pwd`"/$dump/$hash" "$tidyfile"
done < "$conf"
